from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

from framework.base_page import BasePage
from page.advanced_search_page import AdvancedSearchPage


class MainPage(BasePage):
    def __init__(self, driver=None):
        super().__init__(driver)
        self.driver.get('https://ceshiren.com/')
        self.driver.maximize_window()

    def to_advanced_page(self)->AdvancedSearchPage:
        self.click(By.ID, "search-button")
        self.click(By.CSS_SELECTOR,'[title="打开高级搜索"]')
        #self.driver.implicitly_wait(3)
        return AdvancedSearchPage(self.driver)








